Skip to content

fix: avoid double signature check#2686

Closed
joske wants to merge 1 commit intoProvableHQ:stagingfrom
joske:avoid-double-signature-check
Closed

fix: avoid double signature check#2686
joske wants to merge 1 commit intoProvableHQ:stagingfrom
joske:avoid-double-signature-check

Conversation

@joske
Copy link
Contributor

@joske joske commented Apr 17, 2025

Motivation

Avoid double signature verification: ProvableHQ/snarkOS#3558

Test Plan

manually tested

Related PRs

ProvableHQ/snarkOS#3598

@joske joske marked this pull request as ready for review April 23, 2025 09:33
@joske joske force-pushed the avoid-double-signature-check branch from ecfe3d7 to 7fbc5ad Compare April 28, 2025 14:05
Copy link
Collaborator

@kaimast kaimast left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks mostly good to me. I added a note about additional documentation. Imho, every new public function should be documented.

Would it be hard to add unit tests, by the way? There might already be some tests for BatchCertificate::from that you could just adopt.

Final note: Have you thought about adding another from_* constructor instead? As of now, this new function is only called right before BatchCertificate::from_unchecked.

Ok(Self { batch_header, signatures })
}

pub fn check_signature_basic(batch_header: &BatchHeader<N>, signatures: &IndexSet<Signature<N>>) -> Result<()> {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you document this function? It should be clear what it does compared to the checks in BatchCertificate::from.

Maybe you could document BatchCertificate::from a little better as well.

@joske
Copy link
Contributor Author

joske commented May 20, 2025

@kaimast I'm no longer assigned to Aleo, sorry

@vicsn vicsn closed this Jun 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants